<template>
	<view class="list">
		<view class="item" v-for="item in scoreList">
			<view class="left">
				<view class="title">{{ item.level==0?'非实名会员':item.level==1?'价值会员': item.level==2?'金桂会员':item.level==3?'富嘉会员':item.level==4?'钻石会员':item.level==5?'鼎福会员':''}}</view>
				<view class="time">{{ item.createdAt }}</view>
			</view>
			<view class="right">
				<view class="title"></view>
				<view class="time" v-if="item.month">数据来源{{ item.year }}.{{item.month>=10 ? '' :0}}{{item.month}}</view>
				<view class="time" v-if="item.quarter">{{ item.year }}年第{{item.quarter==1?'一':item.quarter==2?'二':item.quarter==3?'三':item.quarter==4?'四':''}}季度</view>
			</view>
			<!-- <view v-if="item.flag === 0" class="right">+{{ item.score }}</view>
			<view v-else class="right">-{{ item.score }}</view> -->
		</view>
	</view>
	<gzListNull :list="scoreList"></gzListNull>
</template>

<script setup>
	import gzListNull from '@/components/gzListNull/gzListNull.vue'; //空数据组件
	// 因为现在是组件 只能使用组件生命周期 页面生命周期无效
	
	const props = defineProps({
		scoreList: {
			type: Array,
			default: []
		}
	})
</script>

<style lang="less" scoped>
	.list{
		padding: 0 40rpx;
		box-sizing: border-box;
		width: 100%;
		display: flex;
		flex-direction: column;
		background-color: #fff;
		.item{
			padding: 40rpx 0;
			border-bottom: 1rpx solid #E6E6E6;
			display: flex;
			justify-content: space-between;
			align-items: center;
			.left{
				display: flex;
				flex-direction: column;
				gap: 18rpx;
				.title{
					font-weight: bold;
					font-size: 28rpx;
					color: #333333;
				}
				.time{
					font-weight: 400;
					font-size: 24rpx;
					color: #A0A9C0;
				}
			}
			.right{
				// font-weight: bold;
				// font-size: 36rpx;
				// color: #FF8833;
				
				display: flex;
				flex-direction: column;
				justify-content: space-between;
				
				gap: 18rpx;
				.title{
					height: 38rpx;
					font-weight: bold;
					font-size: 28rpx;
					color: #333333;
				}
				.time{
					font-weight: 400;
					font-size: 24rpx;
					color: #A0A9C0;
				}
			}
		}
	}
</style>